<!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scal\e=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title></title>
</head>
<body></body>
</html>
(use-package yasnippet
:ensure t
:config
(yas-global-mode)
(use-package yasnippet-snippets :ensure t)
)
Meta-x yas-describe-tables
來看在這個模式下現存的 snippets ,例如在 Emacs Lisp 模式下
# -*- mode: snippet; -*-
#contributor: Xah Lee (XahLee.org)
#name: add-hook
#key: add-hook
#key: ah
# --
(add-hook '${1:name}-hook ${2:'${3:function}})$0
M-x yas-new-snippet
或者快速鍵 Ctrl-c & Ctlr-n,進入
程式的部分,放在 Github,你可以直接下載 init.el 到 ~/.emacs.d/ 下,啟動 Emacs,就會自動安裝這些套件